

public class TestException {

    public static void countDigit(int n) throws NumberTooLargeException {
        if (n >= 100000) {
            throw new NumberTooLargeException();
        }
        System.out.println("There are " + (n + "").length() + " digits in this number");
    }

}
